import Http from "~/apis/utils/http";

export default new (class book_category extends Http {
  getAll() {
    return this.get("bookCategory/all");
  }

  filterData(params?: any) {
    return this.post("bookCategory/filter", params);
  }

  getTreeData(params?: any) {
    return this.get("bookCategory/page/tree", params);
  }

  deleteById(id: any) {
    return this.delete(`bookCategory/delete/${id}`);
  }

  deleteMany(ids: any) {
    return this.post("bookCategory/deleteMany", { ids: ids });
  }

  update(model: any) {
    return this.post("bookCategory/update", model);
  }

  create(model: any) {
    return this.post("bookCategory/create", model);
  }
})();
